Skip to content

Optional fallback option#125

Open
vtsybulin wants to merge 2 commits into
wcandillon:masterfrom
vtsybulin:feature/fallback-option
Open

Optional fallback option#125
vtsybulin wants to merge 2 commits into
wcandillon:masterfrom
vtsybulin:feature/fallback-option

Conversation

@vtsybulin
Copy link
Copy Markdown

@vtsybulin vtsybulin commented Aug 20, 2019

Added optional fallback option in case CacheManager fails to download the main image with error response code different from 200. Fallback should be provided as a local asset module.

@wcandillon Hi there. Thanks for the awesome plugin! Being using it a lot. However, for the current project, I faced an issue: when the image URL is broken or there is a network issue, blurry preview keeps hanging forever. I thought would be good to be able to fall back to some default thumbnail in this case.
Let me know what you think. Thanks

Example of usage:

const fallback = require('...');
...
<Image {...{ preview, uri }} fallback={fallback} />

…case CacheManager fails to download the main image with, error response code different from 200. Fallback should be provided as a local asset module.
@vtsybulin vtsybulin changed the title Added optional fallback option in case CacheManager fails to download the main image with, error response code different from 200. Fallback should be provided as a local asset module. Optional fallback option Aug 20, 2019
@vtsybulin
Copy link
Copy Markdown
Author

@wcandillon Hi. Any feedback on this? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant